<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>供需对接服务系统--项目（外部）编辑页面</title>
    <!--公用样式-->
    <link rel="stylesheet" type="text/css" href="${re.contextPath}/plugin/common/css/comment.css"/>
    <!--页面样式-->
    <link rel="stylesheet" type="text/css" href="${re.contextPath}/plugin/supplier/common/css/style.css"/>
    <!--Layui-->
    <link rel="stylesheet" href="${re.contextPath}/plugin/layui/css/layui.css" media="all"/>
    <!--extended-->
    <link rel="stylesheet" type="text/css" href="${re.contextPath}/plugin/common/css/extended.css"/>
    <!--公用样式JS-->
    <script type="text/javascript" src="${re.contextPath}/plugin/jquery/jquery-3.2.1.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/common/js/comment.js"></script>
    <script type="text/javascript" src="${re.contextPath}/plugin/layui/layui.js" charset="utf-8"></script>

    <script type="text/javascript" src="${re.contextPath}/plugin/supplier/common/js/tel.js" charset="utf-8"></script>
</head>
<style>
    .Right {
        width: 100%;
        overflow-y: scroll;
    }

    .release ul:nth-child(2) li label {
        width: 28%;
    }

    .release ul:first-child li label {
        width: 23%;
    }

    .release .address, .personnel .address {
        width: 65%;
    }

</style>

<body>
<!--头部-->
<header class="whitebg"></header>
<!--容器-->
<div class="container clearfix">
    <!--占位-->
    <!--右侧内容-->
    <div class="Right fr mt50">
        <form class="layui-form" id="myForm" style="margin-left: 20px;    margin-bottom: 50px;">
            <div class="release">
                <ul class="clearfix whitebg">
                    <li class="clearfix">
                        <label class="fl">发布单位<span class="red">*</span> </label>
                        <input type="text" value="${comName}"
                                <#if "${project.status}" != "001">
                                    readonly="readonly"
                                </#if>
                        >
                        <input type="hidden" id = "supProjectId" name="supProjectId" value="${project.supProjectId}">
                        <input type="hidden" class="fl" id="publishCompany" name="publishCompany"
                               value="${project.publishCompany}"
                               lay-verify="notnull">
                    </li>
                    <li class="clearfix">
                        <label class="fl">发布人<span class="red">*</span> </label>
                        <input type="text" class="fl" id="publishBy" value="${project.publishByName}"
                                <#if "${project.status}" != "001">
                                    readonly="readonly"
                                </#if>
                        >
                        <input type="hidden" class="fl" id="publishBy" name="publishBy" value="${project.publishBy}"
                        >
                    </li>
                    <li class="clearfix">
                        <label class="fl">联系电话<span class="red">*</span> </label>
                        <input type="text" name="linkTel" id="linkTel" lay-verify="notnull|phoneNumber"
                               value="${project.linkTel}">
                    </li>
                </ul>
                <ul class="clearfix whitebg mt20">
                    <li class="clearfix">
                        <label class="fl">项目名称<span class="red">*</span> </label>
                        <input type="text" class="fl" id="projectName" name="projectName" lay-maxlength="200"
                                <#if "${project.status}" != "001">
                                    readonly="readonly"
                                </#if>
                               value="${project.projectName}"
                               lay-verify="notnull|maxlength">
                    </li>
                    <li class="clearfix">
                        <label class="fl">项目类型<span class="red">*</span> </label>
                        <div class="category clearfix  xmlxdiv">
                            <#list projectTypeList as vo>
                                <#if "${project.projectType}"?contains("${vo.badtCode}")>
                                    <input type="checkbox" class="fl h15 w25 "
                                            <#if "${project.status}" != "001">
                                                readonly="readonly"
                                            </#if>
                                           name="projectType${vo_index}"
                                           value="${vo.badtCode}" onchange="_crt_page.events.xmlxChange(this)" checked
                                           lay-ignore>
                                <#else >
                                    <input type="checkbox" class="fl h15 w25 "
                                            <#if "${project.status}" != "001">
                                                readonly="readonly"
                                            </#if>
                                           name="projectType${vo_index}"
                                           value="${vo.badtCode}" onchange="_crt_page.events.xmlxChange(this)"
                                           lay-ignore>
                                </#if>
                                <span class="fl mr10">${vo.badtName}</span>
                            </#list>
                        </div>
                    </li>
                    <li class="clearfix" style="width: 100%;">
                        <label class="fl" style="width: 14%;">项目建设总投资<span class="red">*</span></label>
                        <input type="text" style="width: 25%;" class="fl unit-ind-1" name="tzMoney"
                               value="${project.tzMoney}" id="tzMoney" lay-maxlength="20"
                                <#if "${project.status}" != "001">
                                    readonly="readonly"
                                </#if>
                               lay-verify="required|decimal|maxlength">
                        <span class="fl ml10">元</span>
                    </li>
                    <li class="clearfix lx001">
                        <label class="fl">监理服务费<span class="red">*</span></label>
                        <input type="text" class="fl unit-ind-1" name="jlFwMoney" id="jlFwMoney" lay-maxlength="20"
                               lay-verify="required|decimal|maxlength" value="${project.jlFwMoney}"
                               >
                        <span class="fl ml10">元</span>
                    </li>
                    <li class="clearfix lx002 ">
                        <label class="fl">咨询服务费<span class="red">*</span></label>
                        <input type="text" class="fl unit-ind-1" name="zxFwMoney" id="zxFwMoney" lay-maxlength="20"
                               value="${project.zxFwMoney}"
                               >
                        <span class="fl ml10">元</span>
                    </li>
                    <li class="clearfix lx003 ">
                        <label class="fl">检测服务费<span class="red">*</span></label>
                        <input type="text" class="fl unit-ind-1" name="jcFwMoney" id="jcFwMoney" lay-maxlength="20"
                               value="${project.jcFwMoney}"
                               >
                        <span class="fl ml10">元</span>
                    </li>
                    <li class="clearfix lx100 ">
                        <label class="fl">其他服务费<span class="red">*</span></label>
                        <input type="text" class="fl unit-ind-1" name="qtFwMoney" id="qtFwMoney" lay-maxlength="20"
                               value="${project.qtFwMoney}"
                               >
                        <span class="fl ml10">元</span>
                    </li>
                    <li class="clearfix">
                        <label class="fl"  style="width: 28%;">无人应接<span class="red">*</span></label>
                        <input type="text" class="fl unit-ind-1" name="days" id="days" value="${project.days}"
                               lay-verify="required|decimalDay">
                        <span class="fl ml10">天增加费用</span>
                    </li>
                    <li class="clearfix">
                        <label class="fl"  style="width: 28%;">公示天数<span class="red">*</span></label>
                        <input type="text" class="fl unit-ind-1" name="gsDays" id="gsDays"value="${project.gsDays}"
                               lay-verify="required|decimalDay">
                        <span class="fl ml10">天</span>
                    </li>
                    <#-- ============================================================================================-->
                    <li class="clearfix">
                        <label class="fl"  style="width: 28%;">合同编号</label>
                        <input type="text" class="fl unit-ind-1" name="contractNo" id="contractNo" value="${project.contractNo}">
                    </li>
                    <#--<li class="clearfix">
                        <label class="fl"  style="width: 28%;">内部合同编号</label>
                        <input type="text" class="fl unit-ind-1" name="insideContractNo" id="insideContractNo" value="${project.insideContractNo}">
                    </li>-->
                    <li class="clearfix">
                        <label class="fl"  style="width: 28%;">采购/项目编号</label>
                        <input type="text" class="fl unit-ind-1" name="payOrProjectNo" id="payOrProjectNo" value="${project.payOrProjectNo}">
                    </li>
                    <li class="clearfix">
                        <label class="fl"  style="width: 28%;">客户名称<span class="red">*</span></label>
                        <input type="text" class="fl unit-ind-1" name="owerCompany" id="owerCompany" lay-verify="required" value="${project.owerCompany}">
                    </li>
                    <li class="clearfix">
                        <label class="fl"  style="width: 28%;">客户联系人</label>
                        <input type="text" class="fl unit-ind-1" name="projectLeader" id="projectLeader" value="${project.projectLeader}">
                    </li>
                    <li class="clearfix">
                        <label class="fl"  style="width: 28%;">联系人职务</label>
                        <input type="text" class="fl unit-ind-1" name="duty" id="duty" value="${project.duty}">
                    </li>
                    <li class="clearfix">
                        <label class="fl"  style="width: 28%;">中标信息查询网址</label>
                        <input type="text" class="fl unit-ind-1" name="queryWeb" id="queryWeb" value="${project.queryWeb}">
                    </li>
                    <#--<li class="clearfix">
                        <label class="fl"  style="width: 28%;">项目归属</label>
                        <select class="fl" id="projectOwner" name="projectOwner" lay-ignore>
                            <option value="">请选择</option>
                            <#list comlistOwner as vo>
                                <option value="${vo.bcId}"
                                        <#if (project.projectOwner)??>
                                            <#if (project.projectOwner) ==(vo.bcId) >
                                                selected=selected
                                            </#if>
                                        </#if>
                                >${vo.bcName}</option>
                            </#list>
                        </select>
                    </li>-->
                    <#-- ============================================================================================-->
                    <li class="clearfix">
                        <label class="fl"  style="width: 28%;">工期</label>
                        <input type="text" class="fl unit-ind-1" name="gqReq" id="gqReq" value="${project.gqReq}">
<#--                        <span class="fl ml10">月</span>-->
                    </li>
                    <li class="clearfix"  style="width: 100%;">
                        <label class="fl"  style="width: 14%;">招标截止时间<span class="red">*</span></label>
                        <input type="text" class="fl" style="width: 25%;" name="zbEndDate" placeholder="选择时间"
                               lay-verify="required" value="${project.zbEndDate}"
                               autocomplete="off" id="zbEndDate" lay-verify="zbEndDate">
                    </li>
                    <li class="clearfix">
                        <label class="fl">合同签订地<span class="red">*</span></label>
                        <select name="htSignProvince" class="ml8" id="htSignProvince" style="width:90px !important;"
                                onchange="_crt_page.events.provinceChange(this)"
                                lay-verify="required" lay-ignore>
                            <option value="">请选择</option>
                            <#list provincelist as vo>
                                <option value="${vo.code}"
                                        <#if (project.htSignProvince)??>
                                            <#if (project.htSignProvince) ==(vo.code) >
                                                selected=selected
                                            </#if>
                                        </#if>
                                >${vo.name}</option>
                            </#list>
                        </select>


                        <select name="htSignCity" id="htsigncity" class="ml8" lay-verify="required"
                                onchange="_crt_page.events.cityChange(this)"
                                style="width: 90px !important;margin-left: 10px" lay-ignore>
                            <option value="">请选择</option>
                            <#list citylist as vo>
                                <option value="${vo.code}"
                                        <#if "${project.htSignCity}" =="${vo.code}" >
                                            selected=selected
                                        </#if>
                                >${vo.name}</option>
                            </#list>
                        </select>
                        <select name="htSignCounty" id="htsigncounty" class="ml8" lay-filter="htsigncounty"
                                lay-verify="required"
                                style="width:90px !important;margin-left: 10px" lay-ignore>
                            <option value="">请选择</option>
                            <#list countylist as vo>
                                <option value="${vo.code}"
                                        <#if "${project.htSignCounty}" =="${vo.code}" >
                                            selected=selected
                                        </#if>
                                >${vo.name}</option>
                            </#list>
                        </select>
                    </li>
                    <li class="clearfix">
                        <label class="fl">行业类型<span class="red">*</span></label>
                        <select class="fl" id="hyType" name="hyType" lay-verify="required" lay-ignore>
                            <option value="">请选择</option>
                            <#list hytypelist as vo>
                                <option value="${vo.badtCode}"
                                        <#if "${project.hyType}" =="${vo.badtCode}" >
                                            selected=selected
                                        </#if>
                                >${vo.badtName}</option>
                            </#list>
                        </select>
                    </li>
                    <li class="clearfix" style="width: 100%;">
                        <label class="fl" style="width: 14%;">实施地点</label>
                        <div class="address fl clearfix ssplace">
                            <#list  listpalce  as place >
                                <div class="clearfix mt10 divplaceselect">
                                    <select name="projectPlacedtos[${place_index}].province" class="ml8 fl"
                                            id="placeprovince0" onchange="_crt_page.events.provinceChange(this)"
                                            style="width:90px !important;" lay-ignore>
                                        <option value="">请选择</option>
                                        <#list provincelist as vo>
                                            <option value="${vo.code}"
                                                    <#if "${place.province}"=="${vo.code}">
                                                        selected
                                                    </#if>
                                            >${vo.name}</option>
                                        </#list>
                                    </select>
                                    <select name="projectPlacedtos[${place_index}].city" id="placecity0" class="ml8 fl"
                                            lay-filter="city" onchange="_crt_page.events.cityChange(this)"
                                            style="width: 90px !important;margin-left: 10px" lay-ignore>
                                        <option value="">请选择</option>
                                        <#list place.citys as vocity>
                                            <option value="${vocity.code}"
                                                    <#if "${place.city}"=="${vocity.code}">
                                                        selected
                                                    </#if>
                                            >${vocity.name}</option>
                                        </#list>
                                    </select>
                                    <select name="projectPlacedtos[${place_index}].county" id="placecounty0"
                                            class="ml8 fl" lay-filter="county"
                                            style="width:90px !important;margin-left: 10px" lay-ignore>
                                        <option value="">请选择</option>
                                        <#list place.countys as vocounty>
                                            <option value="${vocounty.code}"
                                                    <#if "${place.county}"=="${vocounty.code}">
                                                        selected
                                                    </#if>
                                            >${vocounty.name}</option>
                                        </#list>
                                    </select>
                                    <img src="${re.contextPath}/plugin/common/images/77@2x.png"
                                         class="fl ml20 addplaceimage" onclick="_crt_page.events.addPlace(this)">
                                    <img src="${re.contextPath}/plugin/common/images/76@2x.png" class="fl ml20"
                                         onclick="_crt_page.events.deletePlace(this)">
                                </div>
                            </#list>
                        </div>
                    </li>
                    <li class="clearfix">
                        <label class="fl">其他需求</label>
                        <textarea id="otherXq" name="otherXq" autocomplete="off" placeholder="请输入其他要求,输入内容最大200个汉字"
                                  lay-maxlength="200" lay-verify="maxlength">${project.otherXq}</textarea>
                    </li>
                </ul>
            </div>
            <div class="personnel whitebg">
                <div class="bold">主要负责人要求</div>
                <ul>
                    <li class="clearfix">
                        <label class="fl">性别：</label>
                        <select name="mainFzSex" id="mainFzSex" class="fl" lay-ignore>
                            <option value="0"
                                    <#if "${project.mainFzSex}"=="0">selected</#if>
                            >女
                            </option>
                            <option value="1"
                                    <#if "${project.mainFzSex}"=="1">selected</#if>
                            >男
                            </option>
                            <option value=""
                                    <#if "${project.mainFzSex}"=="">selected</#if>
                            >不限
                            </option>
                        </select>
                    </li>
                    <li class="clearfix">
                        <label class="fl">学历：</label>
                        <select name="mainFzXl" id="mainFzXl" class="fl" lay-ignore>
                            <option value="" selected>不限</option>
                            <#list edulist as vo>
                                <option value="${vo.badtCode}"
                                        <#if "${project.mainFzXl}"=="${vo.badtCode}">
                                            selected
                                        </#if>
                                >${vo.badtName}</option>
                            </#list>
                        </select>
                    </li>
                    <li class="clearfix">
                        <label class="fl">地区：</label>
                        <div class="address fl clearfix mainpersonplace">
                            <#if (listperpalce?size>0)  >
                                <#list  listperpalce  as place >
                                    <div class="clearfix mt10 divpersonplaceselect">

                                        <select name="personPlacedtos[${place_index}].province" class="ml8 fl"
                                                id="personplaceprovince0" style="width:200px !important;"
                                                onchange="_crt_page.events.provinceChange(this)"
                                                lay-ignore>
                                            <option value="">请选择</option>
                                            <#list provincelist as vo>
                                                <option value="${vo.code}"
                                                        <#if "${place.province}"=="${vo.code}">
                                                            selected
                                                        </#if>
                                                >${vo.name}</option>
                                            </#list>
                                        </select>
                                        <select name="personPlacedtos[${place_index}].city" id="personplacecity0"
                                                class="ml8 fl" lay-filter="city"
                                                style="width: 200px !important;margin-left: 10px" lay-ignore>
                                            <option value="">请选择</option>
                                            <#list place.citys as vocity>
                                                <option value="${vocity.code}"
                                                        <#if "${place.city}"=="${vocity.code}">
                                                            selected
                                                        </#if>
                                                >${vocity.name}</option>
                                            </#list>
                                        </select>
                                        <img src="${re.contextPath}/plugin/common/images/77@2x.png" class="fl ml20"
                                             onclick="_crt_page.events.addPersonPlace(this)">
                                        <img src="${re.contextPath}/plugin/common/images/76@2x.png" class="fl ml20"
                                             onclick="_crt_page.events.deletePersonPlace(this)">


                                    </div>

                                </#list>
                            <#else >

                                <select name="personPlacedtos[0].province" class="ml8 fl" id="personplaceprovince0"
                                        style="width:200px !important;" onchange="_crt_page.events.provinceChange(this)"
                                        lay-ignore>
                                    <option value="">请选择</option>
                                    <#list provincelist as vo>
                                        <option value="${vo.code}">${vo.name}</option>
                                    </#list>
                                </select>
                                <select name="personPlacedtos[0].city" id="personplacecity0" class="ml8 fl"
                                        lay-filter="city"
                                        style="width: 200px !important;margin-left: 10px" lay-ignore>
                                    <option value="">请选择</option>
                                </select>
                                <img src="${re.contextPath}/plugin/common/images/77@2x.png" class="fl ml20"
                                     onclick="_crt_page.events.addPersonPlace(this)">
                                <img src="${re.contextPath}/plugin/common/images/76@2x.png" class="fl ml20"
                                     onclick="_crt_page.events.deletePersonPlace(this)">


                            </#if>
                        </div>
                    </li>
                    <li class="clearfix">
                        <label class="fl">擅长领域：</label>
                        <div class="category clearfix fl">
                            <#list doBestList as vo>
                                <div style="display: inline-block">
                                    <input type="checkbox" class="fl h15 w25 doBestInput" name="mainFzField"
                                           value="${vo.badtCode}" lay-ignore
                                            <#if "${project.mainFzField}"?contains("${vo.badtCode}")>
                                                checked
                                            </#if>
                                    >
                                    <span class="fl mr10">${vo.badtName}</span>
                                </div>
                            </#list>
                        </div>
                    </li>
                    <li class="clearfix">
                        <label class="fl">需要出差：</label>
                        <select name="mainFzTrip" id="mainFzTrip" class="fl" lay-ignore>
                            <option value="0"
                                    <#if "${project.mainFzTrip}"=="0">
                                        selected
                                    </#if>
                            >否
                            </option>
                            <option value="1"
                                    <#if "${project.mainFzTrip}"=="1">
                                        selected
                                    </#if>
                            >是
                            </option>
                        </select>
                    </li>
                    <li class="clearfix">
                        <label class="fl" class="fl">备注：</label>
                        <textarea id="mainFzRemark" name="mainFzRemark" autocomplete="off" placeholder="请输入备注,输入内容最大200个汉字"
                                  lay-maxlength="200" lay-verify="maxlength">${project.mainFzRemark}</textarea>
                    </li>
                </ul>
            </div>
            <div class="downModule whitebg mt30">

                <ul>
                    <li class="uploadli upload_zbwj_li">
                        <div class="clearfix upload_oper_div">
                            <div class="downModuleTip clearfix fl">
                                <span class="fl mt10"><strong>上传项目招标文件</strong>(项目招标文件上传的文件名称必须包含“招标”字样)</span>
                            </div>
                            <div class="downModuleBtn clearfix fr">
                                <img src="${re.contextPath}/plugin/common/images/18@2x.png" class="file-upload fl"
                                     filedata="{'type':'312','projectType':'002'}" alt="" class="fl">
                                <img src="${re.contextPath}/plugin/common/images/19@2x.png" alt=""
                                     onclick="_crt_page.events.delFile(this)" class="fl">
                       <#--         <button class="fl bluebg white fl ml20 upfinish" type="button"
                                        onclick="_crt_page.events.finishfile(this)">完成
                                </button>-->
                            </div>
                        </div>
                        <ul>
                            <#list filelist  as vo  >
                                <#if "${vo.type}"=="312" >
                                    <li class="clearfix">
                                        <input type="checkbox" class="fl" value="${vo.id}" style="display:inline-block;"
                                               lay-ignore>
                                        <span class="fl ml10">
											<span id="${vo.id}" class="cursor" url="${vo.url}" onclick="_crt_file.events.viewFile(this)">${vo.fileName}</span>
										</span>
                                    </li>
                                </#if>
                            </#list>
                        </ul>
                    </li>

                </ul>

            </div>
            <div class="releaseBtn center">
                <button type="submit" lay-submit lay-filter="save"onclick="resetRequired()" class="bluebg white ft18" id="btnsave">保存</button>
                <#if '${fix}'!='1'>
                 <button type="submit" lay-submit lay-filter="submit" onclick="resetRequiredSubmit()"class="bluebg white ft18" id="btnsubmit">提交
                </button>
                </#if>

            </div>
        </form>

    </div>
</div>
<!--JQ-->
<!--公用样式JS-->
<script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/common/js/comment.js"></script>
<script type="text/javascript" src="${re.contextPath}/plugin/tools/tool.js"></script>
<!--启动JS-->
<script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/common/js/jquery.boot.js"></script>
<!--启动JS-->
<script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/common/js/jquery.common.js"></script>
<script type="text/javascript" src="${re.contextPath}/plugin/layui/layui.all.js"></script>
<script type="text/javascript" src="${re.contextPath}/pageoffice.js" id="po_js_main"></script>
<script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/common/js/form.file.js"></script>
<script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/supplier/common/js/fileoper.js"></script>
<!-- 公共配置第三方组件 -->
<script type="text/javascript">
    layui.config({
        version: false,
        debug: false,
        base: "${re.contextPath}/plugin/layui/lay/extra/"
    })
</script>

<script>
    var layer, form, laydate, table, autocomplete;
    var _crt_page;
    layui.use(['form', 'laydate', 'layer', 'autocomplete'], function () {
        layer = layui.layer;
        form = layui.form;
        laydate = layui.laydate;

        $('.close').click(function () {
            var index = parent.layer.getFrameIndex(window.name);
            parent.layer.close(index);
        });
        form.verify({
            maxlength: function (v, item) {
                var maxlength = item.getAttribute('lay-maxlength');
                if (v.trim() != '') {
                    if (v.trim().length > maxlength) {
                        return "输入长度不能大于" + maxlength + "个字符！";
                    }
                }
            },
            phoneNumber: function (v) {
                if (v.trim() == '') {
                    return '手机号不能为空';
                } else {
                    if (!v.trim().isMobile() && !v.trim().isTel()) {
                        return '请输入正确的手机号码或电话号码\n\n例如:13916752109或0531-3614072';
                    }
                }
            },
            number: function (v) {
                if (v.trim() == '') {
                    return;
                }
                var reg = /^[0-9]*$/;
                var flag = reg.test(v.trim());
                if (!flag) {
                    return '请输入正确的数字';
                }
            },
            decimalDay: function (v) {
                if (v.trim() == '') {
                    return;
                }
                var reg = /^-?([0-9]+|[0-9]{1,3}(,[0-9]{3})*)(.[0-9]{1,2})?$/;
                var flag = reg.test(v.trim());
                if (!flag) {
                    return '请输入正确的天数';
                }
            },
            decimal: function (v) {
                if (v.trim() == '') {
                    return;
                }
                var reg = /^-?([0-9]+|[0-9]{1,3}(,[0-9]{3})*)(.[0-9]{1,10})?$/;
                var flag = reg.test(v.trim());
                if (!flag) {
                    return '请输入正确的金额';
                }
            },
            perdecimal: function (v) {
                if (v.trim() == '') {
                    return;
                }
                var reg = /^[1-9][0-9]*([.][0-9]+)?$/;
                var flag = reg.test(v.trim());
                if (!flag) {
                    if (v.trim() != "0" || v.trim() != 0) {
                        return '请输入数字';
                    }
                }
            },
            required: function (v) {
                if("${project.status}" != "001"){
                    if(v==""){
                        return "必填项不能为空";
                    }
                }
            },
            notnull: function (v, obj) {
                if (v == "") {
                    var str = $(obj).prev().text()
                    console.log(str)
                    return str + "必填项不能为空";
                }
            }
        })
        _crt_page = {
            init: function () {
                //初始化事件
                _crt_page.events._init();
                //初始化Form
                form.on('submit(save)', _crt_page.forms.save);
                form.on('submit(submit)', _crt_page.forms.commit);
            },
            forms: {
                save: function (data) {
                    $('#btnsave').addClass("layui-btn-disabled").attr("disabled", true);
                    $('#btnsubmit').addClass("layui-btn-disabled").attr("disabled", true);
                    var yj='${fix}';
                    var  url='/supplier/projectManager/updateSave?flag=0';
                    if(yj=='1'){
                        url='/supplier/projectManager/updateSave?flag=0&yj=1';
                    }
                    var istg;
                    if("${project.status}" == "001"){
                        istg =_crt_page.events.saveBeforeBjy(data);
                    }else{
                        istg =_crt_page.events.saveBefore(data);
                    }
                    if (istg) {
                        if("${project.status}" != "001"){
                            if(data.field.jlFwMoney && Number(data.field.jlFwMoney)<=0){
                                $('#btnsave').removeClass("layui-btn-disabled").attr("disabled", false);
                                $('#btnsubmit').removeClass("layui-btn-disabled").attr("disabled", false);
                                layer.msg('金额不正确', {icon: 2});return false;
                            }
                            if(data.field.zxFwMoney && Number(data.field.zxFwMoney)<=0){
                                $('#btnsave').removeClass("layui-btn-disabled").attr("disabled", false);
                                $('#btnsubmit').removeClass("layui-btn-disabled").attr("disabled", false);
                                layer.msg('金额不正确', {icon: 2});return false;
                            }
                            if(data.field.jcFwMoney && Number(data.field.jcFwMoney)<=0){
                                $('#btnsave').removeClass("layui-btn-disabled").attr("disabled", false);
                                $('#btnsubmit').removeClass("layui-btn-disabled").attr("disabled", false);
                                layer.msg('金额不正确', {icon: 2});return false;
                            }
                            if(data.field.qtFwMoney && Number(data.field.qtFwMoney)<=0){
                                $('#btnsave').removeClass("layui-btn-disabled").attr("disabled", false);
                                $('#btnsubmit').removeClass("layui-btn-disabled").attr("disabled", false);
                                layer.msg('金额不正确', {icon: 2});return false;
                            }
                            if (data.field.tzMoney && Number(data.field.tzMoney)<=0){
                                $('#btnsave').removeClass("layui-btn-disabled").attr("disabled", false);
                                $('#btnsubmit').removeClass("layui-btn-disabled").attr("disabled", false);
                                layer.msg('金额不正确', {icon: 2});return false;
                            }
                        }
                        layerAjax(url, data.field, '', function (d) {
                            $('#btnsave').removeClass("layui-btn-disabled").attr("disabled", false);
                            $('#btnsubmit').removeClass("layui-btn-disabled").attr("disabled", false);
                            if (d.flag == true) {
                                layer.msg(d.msg, {icon: 1});
                                setTimeout(tzym,2000);
                            } else {
                                layer.msg(d.msg, {icon: 2});
                            }
                        });
                    }
                    return false;


                },
                commit: function (data) {
                    var istg = _crt_page.events.saveBefore(data);
                    if (istg) {
                        var url = '/supplier/projectManager/updateSave?flag=1';
                        if(data.field.jlFwMoney && Number(data.field.jlFwMoney)<=0){
                            layer.msg('金额不正确', {icon: 2});return false;
                        }
                        if(data.field.zxFwMoney && Number(data.field.zxFwMoney)<=0){
                            layer.msg('金额不正确', {icon: 2});return false;
                        }
                        if(data.field.jcFwMoney && Number(data.field.jcFwMoney)<=0){
                            layer.msg('金额不正确', {icon: 2});return false;
                        }
                        if(data.field.qtFwMoney && Number(data.field.qtFwMoney)<=0){
                            layer.msg('金额不正确', {icon: 2});return false;
                        }
                        if (data.field.tzMoney && Number(data.field.tzMoney)<=0){
                            layer.msg('金额不正确', {icon: 2});return false;
                        }
                        layerAjax(url, data.field, '', function (d) {
                            if (d.flag == true) {
                                //保存和提交按钮不可用
                                layer.msg("提交成功，请耐心等待平台审核", {icon: 1});
                                setTimeout(tzym,2000);
                            } else {
                                $('#btnsave').removeClass("layui-btn-disabled").attr("disabled", false);
                                $('#btnsubmit').removeClass("layui-btn-disabled").attr("disabled", false);

                                layer.msg(d.msg, {icon: 2});
                            }
                        });
                    }
                    return false;
                }

            },
            events: {
                _init: function () {
                    form.on('submit(save)', _crt_page.forms.create);
                    form.on('submit(submit)', _crt_page.forms.submit);
                    _crt_page.events.gqdateInit();
                    _crt_page.events.uploadInit();
                    _crt_page.events.lxInit();
                },
                gqdateInit: function () {
                    // 工期开始时间
                    laydate.render({
                        elem: '#gqBeginDate',
                        trigger: 'click',
                        done: function (value, date) {
                            var that = $(this.elem[0])
                            console.log(that);
                            var endDate = $("#gqEndDate").val();
                            if (endDate && endDate < value) {
                                layer.msg("开始时间不能大于结束时间", {icon: 2});
                                $(that).val("");
                                return;
                            }
                        }
                    });
                    // 工期截止时间
                    laydate.render({
                        elem: '#gqEndDate',
                        trigger: 'click',
                        done: function (value, date) {
                            var that = $(this.elem[0])
                            console.log(that);
                            var startDate = $("#gqBeginDate").val();
                            if (startDate && startDate > value) {
                                layer.msg("结束时间不能小于开始时间", {icon: 2});
                                $(that).val("");
                                return;
                            }
                        }
                    });
                    // 招标截止时间
                    laydate.render({
                        elem: '#zbEndDate',
                        trigger: 'click',
                        type: 'datetime',
                        format: 'yyyy-MM-dd HH:mm'

                    });
                    // 合同签订时间
                    laydate.render({
                        elem: '#htSignDate',
                        trigger: 'click',
                        type: 'datetime',
                        format: 'yyyy-MM-dd HH:mm'
                    });

                },
                uploadInit: function () {
                    var tempFileIds = [];
                    $.each($('.file-upload'), function (i, e) {
                        //绑定一个个上传文件:
                        var fileDataStr = $(e).attr('filedata');
                        //至少fileData中需要有文件的类型编码
                        var fileData = eval('(' + fileDataStr + ')');
                        var fileContainer = $(e).parents(".upload_oper_div").next();
                        var type = fileData.type;
                        var ext = '';
                        // if (type == '311') {
                        //     //书著文件,只能上传文档
                        //     ext = 'doc|docx';
                        // } else if (type == '312') {
                        //     //扫描件,只能上传pdf
                        //     ext = 'doc|docx';
                        // } else if (type == '313') {
                        //     ext = 'doc|docx';
                        // } else if (type == '314') {
                        //     ext = 'pdf';
                        // } else if (type == '315') {
                        //     ext = 'doc|docx';
                        // }
                        //上传组件参数自定义:
                        var uploadPara = {
                            elem: $(e),
                            accept: 'file',
                            temp: "1",
                            exts: ext,
                            before: function (res) {
                                this.data = fileData;
                            },
                            done: function (res) {
                                if (res.flag) {
                                    var newFileId = res.data.id;
                                    var type = res.data.type + '';
                                    var newIndex = $('.form-file-div').length * 1;
                                    layer.msg("上传成功", {icon: 1});
                                    $(e).parent().find(".upfinish").removeClass("layui-btn-disabled").attr("disabled", false);
                                    $(fileContainer).append("    <li class=\"clearfix form-file-div form-file-div-" + type + "\">" +
                                        "                            <input type=\"checkbox\" class=\"fl\"  style=\"display: inline-block;\" lay-ignore>\n" +
                                        "                            <span class=\"fl ml10\"><span class=\"cursor\" id=\""+res.data.id+"\" url=\""+res.data.url+"\" onclick=\"_crt_file.events.viewFile(this)\">" + res.data.fileName + "</span></span>\n" +
                                        '                            <input type="hidden" class="' + type + '-input" name="tempFormFileIds[' + newIndex + ']" value="' + newFileId + '" />' +
                                        "                        </li>");
                                } else {
                                    layer.msg(res.msg, {icon: 2})
                                }
                            },
                            container: fileContainer
                            // fileOrder: 'desc'
                        };
                        _form_file.upload.bind(uploadPara);
                    })
                },
                lxInit: function () {
                    $(".xmlxdiv").find("[type='checkbox']").each(function (i, v) {
                        var lxvalue = $(v).attr("value");
                        if ($(v).prop("checked")) {
                            $(".lx" + lxvalue).attr("style", "display:block;")
                            $(".lx" + lxvalue).find("input").attr("lay-verify", "required|decimal|maxlength")
                        } else {
                            $(".lx" + lxvalue).attr("style", "display:none;")
                            $(".lx" + lxvalue).find("input").removeAttr("lay-verify");
                            $(".lx" + lxvalue).find("input").val("");
                        }
                    });
                },
                finishfile: function (object) {
                    var length = $(object).parents(".uploadli").find("ul").find("li").length;
                    if (length == 0) {
                        layer.msg("请上传文件", {icon: 2})
                        return;
                    }

                    var fileDataStr = $(object).parent().find(".file-upload ").attr('filedata');
                    //至少fileData中需要有文件的类型编码
                    var fileData = eval('(' + fileDataStr + ')');
                    var finishId = fileData.type + "finish";
                    $("#" + finishId).val("1");
                    layer.msg("操作成功", {icon: 1});

                },
                delFile: function (object) {
                    var checkbox = $(object).parents(".uploadli").find("ul").find("li").find("input:checked");
                    if (checkbox.length == 0) {
                        layer.msg("请选择文件", {icon: 2});
                        return;
                    }
                    var ids = [];
                    checkbox.each(function (i, v) {
                        var _a = $(v).val();
                        ids.push(_a);
                    });
                    var ids = ids.join(',');
                    layer.confirm('确定删除文件吗？', function (index) {
                        layerAjax('/supplier/deleteFile', {"ids": ids}, '', function (d) {
                            if (d.flag) {
                                checkbox.each(function (i, v) {
                                    $(v).parent().remove();
                                });
                                layer.msg("删除成功！");
                            } else {
                                layer.msg(d.msg, {icon: 2});
                            }
                        });
                    });

                },
                saveBeforeBjy: function (data) {
                    var isTg = true;
                    var lxlength = $(".xmlxdiv").find("[type='checkbox']:checked").length;
                    if (lxlength == 0) {
                        $('#btnsave').removeClass("layui-btn-disabled").attr("disabled", false);
                        $('#btnsubmit').removeClass("layui-btn-disabled").attr("disabled", false);
                        layer.msg("请选择项目类型", {icon: 2});
                        isTg = false;
                        return isTg;
                    }
                    var lxsz = [];
                    $(".xmlxdiv").find("[type='checkbox']:checked").each(function (i, v) {
                        var lxvalue = $(v).attr("value");
                        lxsz.push(lxvalue);
                    });
                    lxsz = lxsz.join(',');
                    data.field.projectType = lxsz;
                    var dobest = [];
                    $(".doBestInput:checked").each(function (i, v) {
                        var value = $(v).attr("value");
                        dobest.push(value);
                    });
                    dobest = dobest.join(',');
                    data.field.mainFzField = dobest;
                    return isTg;


                },
                saveBefore: function (data) {
                    var isTg = true;
                    var lxlength = $(".xmlxdiv").find("[type='checkbox']:checked").length;
                    if (lxlength == 0) {
                        $('#btnsave').removeClass("layui-btn-disabled").attr("disabled", false);
                        $('#btnsubmit').removeClass("layui-btn-disabled").attr("disabled", false);
                        layer.msg("请选择项目类型", {icon: 2});
                        isTg = false;
                        return isTg;
                    }
                    var lxsz = [];
                    $(".xmlxdiv").find("[type='checkbox']:checked").each(function (i, v) {
                        var lxvalue = $(v).attr("value");
                        lxsz.push(lxvalue);
                    });
                    lxsz = lxsz.join(',');
                    data.field.projectType = lxsz;
                    var dobest = [];
                    $(".doBestInput:checked").each(function (i, v) {
                        var value = $(v).attr("value");
                        dobest.push(value);
                    });
                    dobest = dobest.join(',');
                    data.field.mainFzField = dobest;
                    return isTg;


                },
                ssfybulur: function (object) {
                    var ssfy = $(object).val();
                    var ssblper = '${ssblper}';
                    if (ssfy) {
                        var fwfy = (ssfy * ssblper).toFixed(2);
                        $(object).parent().next().find("input").val(fwfy);
                    }

                },
                xmlxChange: function (object) {
                    var lxvalue = $(object).attr("value");
                    if ($(object).prop("checked")) {
                        $(".lx" + lxvalue).attr("style", "display:block;")
                        $(".lx" + lxvalue).find("input").attr("lay-verify", "required|decimal|maxlength")
                    } else {
                        $(".lx" + lxvalue).attr("style", "display:none;")
                        $(".lx" + lxvalue).find("input").removeAttr("lay-verify");
                        $(".lx" + lxvalue).find("input").val("");
                    }
                },
                needZtbChange: function (object) {
                    var lxvalue = $(object).attr("value");
                    if ($(object).prop("checked") && lxvalue == '1') {
                        $(".LIisZb").css({"display": "block", "width": "60%"});
                    } else {
                        // 是否招标不显示
                        $(".LIisZb").attr("style", "display:none;")
                        $(".LIisZb").find("input").prop('checked', false);
                        /*             $(".LIqdHt").attr("style","display:none;")
                                     $(".LIqdHt").find("input").prop('checked',false);
                                     $(".sfk").attr("style","display:none;")
                                     $(".sfk").find("input").prop('checked',false);
                                     $(".htqdhj").attr("style","display:none;")
                                     $(".htqdhj").find("input").val("");*/
                    }
                    _crt_page.events.radioChange();

                },
                isZbChange: function (object) {
                    var lxvalue = $(object).attr("value");
                    if ($(object).prop("checked") && lxvalue == '1') {
                        $(".LIqdHt").css({"display": "block", "width": "60%"});
                        $(".LIqdHt").find("input").prop('disabled', false);
                    } else {
                        //是否已签合同（默认“否”，不可修改）
                        $(".LIqdHt").css({"display": "block", "width": "60%"});
                        $(".LIqdHt").find("input").prop('checked', true);
                        $(".LIqdHt").find("input").prop('disabled', true);

                        $(".sfk").attr("style", "display:none;")
                        $(".sfk").find("input").prop('checked', false);
                        $(".htqdhj").attr("style", "display:none;")
                        $(".htqdhj").find("input").val("");
                    }
                    _crt_page.events.radioChange();
                },
                qdHtChange: function (object) {
                    var lxvalue = $(object).attr("value");
                    if ($(object).prop("checked") && lxvalue == '1') {
                        $(".sfk").css({"display": "block", "width": "60%"});
                        $(".htqdhj").css({"display": "block", "width": "60%"});
                        $(".htqdhj").find("input").attr("lay-verify", "required")
                    } else {
                        $(".sfk").attr("style", "display:none;")
                        $(".sfk").find("input").prop('checked', false);
                        $(".htqdhj").find("input").removeAttr("lay-verify")
                        $(".htqdhj").attr("style", "display:none;")
                        $(".htqdhj").find("input").val("");
                    }
                    _crt_page.events.radioChange();
                },
                radioChange: function () {
                    // (1) ，则显示 “上传项目招标文件”、“上传项目投标文件”、“上传合同


                    var ztb = $(".divneedzb").find("[type='radio']:checked").attr("value");
                    var iszb = $(".LIisZb").find("[type='radio']:checked").attr("value");
                    var qdht = $(".LIqdHt").find("[type='radio']:checked").attr("value");
                    if (ztb == "1" && iszb == "1" && qdht == "1") {
                        //  则显示 “上传项目招标文件”、“上传项目投标文件”、“上传合同”。
                        $(".upload_zbwj_li").css('display', 'block');
                        $(".upload_tbwj_li").css('display', 'block');
                        $(".upload_ht_li").css('display', 'block');


                        /*	$(".upload_zbwjsmw_li").find("ul").find("li").remove();
                            $(".upload_htsmwj_li").find("ul").find("li").remove();*/
                        /*$(".upload_zbwjsmw_li").css('display','none');
                        $(".upload_htsmwj_li").css('display','none');*/
                    }
                    if (ztb == "1" && iszb == "1" && qdht == "0") {
                        //  则显示 “上传项目招标文件”、“上传项目投标文件”、“上传合同”。
                        $(".upload_zbwj_li").css('display', 'block');
                        $(".upload_tbwj_li").css('display', 'block');
                        $(".upload_htsmwj_li").css('display', 'block');


                        /*	$(".upload_zbwjsmw_li").find("ul").find("li").remove();
                            $(".upload_ht_li").find("ul").find("li").remove();*/
                        /*	$(".upload_zbwjsmw_li").css('display','none');
                            $(".upload_ht_li").css('display','none');*/

                    }
                    if (ztb == "1" && iszb == "0" && qdht == "0") {
                        //  “上传项目招标文件说明文件”、“上传合同说明文件”
                        $(".upload_zbwjsmw_li").css('display', 'block');
                        $(".upload_htsmwj_li").css('display', 'block');


                        /*	$(".upload_zbwj_li").find("ul").find("li").remove();
                            $(".upload_tbwj_li").find("ul").find("li").remove();
                            $(".upload_ht_li").find("ul").find("li").remove();*/
                        /*	$(".upload_zbwj_li").css('display','none');
                            $(".upload_tbwj_li").css('display','none');
                            $(".upload_ht_li").css('display','none');*/
                    }
                    if (ztb == "0" && qdht == "1") {
                        //  “上传项目招标文件说明文件”、“上传合同说明文件”
                        $(".upload_ht_li").css('display', 'block');


                        /*		$(".upload_zbwjsmw_li").find("ul").find("li").remove();
                                $(".upload_htsmwj_li").find("ul").find("li").remove();
                                $(".upload_zbwj_li").find("ul").find("li").remove();
                                $(".upload_tbwj_li").find("ul").find("li").remove();*/
                        /*	$(".upload_zbwjsmw_li").css('display','none');
                            $(".upload_htsmwj_li").css('display','none');
                            $(".upload_zbwj_li").css('display','none');
                            $(".upload_tbwj_li").css('display','none');*/
                    }
                    if (ztb == "0" && qdht == "0") {
                        //  “上传项目招标文件说明文件”、“上传合同说明文件”
                        $(".upload_htsmwj_li").css('display', 'block');

                        /*		$(".upload_zbwj_li").find("ul").find("li").remove();
                                $(".upload_tbwj_li").find("ul").find("li").remove();
                                $(".upload_ht_li").find("ul").find("li").remove();
                                $(".upload_zbwjsmw_li").find("ul").find("li").remove();

                                $(".upload_zbwj_li").css('display','none');
                                $(".upload_tbwj_li").css('display','none');
                                $(".upload_ht_li").css('display','none');
                                $(".upload_zbwjsmw_li").css('display','none');*/
                    }

                },
                provinceChange: function (object) {
                    var code = $(object).find('option:selected').val();
                    if (code == "") {
                        return;
                    }
                    layerAjaxGet('/sys/register/getOrganize', {"code": code}, '', function (d) {
                        if (d.flag == true) {
                            $(object).next().empty().append("<option value=''>选择市</option>");
                            for (var i = 0; i < d.data.length; i++) {
                                $(object).next().append("<option value='" + d.data[i].code + "'>" + d.data[i].name + "</option>");
                            }
                        } else {
                            layer.msg(d.msg, {icon: 2});
                        }
                    });


                },
                cityChange: function (object) {
                    var code = $(object).find('option:selected').val();
                    if (code == "") {
                        return;
                    }
                    layerAjaxGet('/sys/register/getOrganize', {"code": code}, '', function (d) {
                        if (d.flag == true) {
                            $(object).next().empty().append("<option value=''>选择区县</option>");
                            for (var i = 0; i < d.data.length; i++) {
                                $(object).next().append("<option value='" + d.data[i].code + "'>" + d.data[i].name + "</option>");
                            }
                        } else {
                            layer.msg(d.msg, {icon: 2});
                        }
                    });


                },
                personPlaceProvinceInit: function () {
                    $(".mainpersonplace").find("div").each(function (i, v) {
                        var provinceId = $(v).find("select:first").attr("id");
                        var cityId = $(v).find("select:eq(1)").attr("id");
                        $("#" + provinceId).change(function () {
                            var code = $('#' + provinceId + ' option:selected').val();
                            if (code == "") {
                                return;
                            }
                            layerAjaxGet('/sys/register/getOrganize', {"code": code}, '', function (d) {
                                if (d.flag == true) {
                                    $("#" + cityId).empty().append("<option value=''>选择市</option>");
                                    for (var i = 0; i < d.data.length; i++) {
                                        $("#" + cityId).append("<option value='" + d.data[i].code + "'>" + d.data[i].name + "</option>");
                                    }
                                } else {
                                    layer.msg(d.msg, {icon: 2});
                                }
                            });

                        });
                    });
                },
                placeCityInit: function () {
                    $(".ssplace").find("div").each(function (i, v) {
                        var cityId = $(v).find("select:eq(1)").attr("id");
                        var countyId = $(v).find("select:eq(2)").attr("id");
                        $("#" + cityId).change(function () {
                            var code = $('#' + cityId + ' option:selected').val();
                            if (code == "") {
                                return;
                            }
                            layerAjaxGet('/sys/register/getOrganize', {"code": code}, '', function (d) {
                                if (d.flag == true) {
                                    $("#" + countyId).empty().append("<option value=''>选择区县</option>");
                                    for (var i = 0; i < d.data.length; i++) {
                                        $("#" + countyId).append("<option value='" + d.data[i].code + "'>" + d.data[i].name + "</option>");
                                    }
                                } else {
                                    layer.msg(d.msg, {icon: 2});
                                }
                            });

                        });
                    });

                },
                resetPlace: function () {
                    /*  $(".ssplace").find(".addplaceimage:not(:last)").attr("style","display:none;")*/
                    $(".ssplace").find(".divplaceselect").each(function (i, v) {
                        $(v).find("select:eq(0)").attr("name", "projectPlacedtos[" + i + "].province")
                        $(v).find("select:eq(1)").attr("name", "projectPlacedtos[" + i + "].city");
                        $(v).find("select:eq(2)").attr("name", "projectPlacedtos[" + i + "].county");
                        $(v).find("select:eq(0)").attr("lay-filter", "projectPlacedtos[" + i + "].province");
                        $(v).find("select:eq(1)").attr("lay-filter", "projectPlacedtos[" + i + "].city");
                        $(v).find("select:eq(2)").attr("lay-filter", "projectPlacedtos[" + i + "].county");
                    });
                },
                resetPersonPlace: function () {
                    /*  $(".ssplace").find(".addplaceimage:not(:last)").attr("style","display:none;")*/
                    $(".mainpersonplace").find(".divpersonplaceselect").each(function (i, v) {
                        $(v).find("select:eq(0)").attr("name", "personPlacedtos[" + i + "].province")
                        $(v).find("select:eq(0)").attr("lay-filter", "personPlacedtos[" + i + "].province");
                        $(v).find("select:eq(1)").attr("name", "personPlacedtos[" + i + "].city");
                        $(v).find("select:eq(1)").attr("lay-filter", "personPlacedtos[" + i + "].city");

                    });
                },
                deletePlace: function (object) {
                    var placeLength = $(".ssplace").find(".divplaceselect").length;
                    if (placeLength == 1) {
                        layer.msg("实施地点不能全部删除", {icon: 2});
                    } else {
                        $(object).parent().remove();
                        _crt_page.events.resetPlace();
                    }

                },
                addPlace: function (object) {
                    $(object).parent().after(" <div class=\"clearfix mt10 divplaceselect\">\n" +
                        "                            <select name=\"projectPlacedtos[1].province\" class=\"ml8 fl\" id=\"placeprovince1\"   onchange=\"_crt_page.events.provinceChange(this)\"  style=\"width:90px !important;\"\n" +
                        "                                    lay-verify=\"required\" lay-ignore>\n" +
                        "                                <option value=\"\">请选择</option>\n" +
                        "                                <#list provincelist as vo>\n" +
                        "                                    <option value=\"${vo.code}\">${vo.name}</option>\n" +
                        "                                </#list>\n" +
                        "                            </select>\n" +
                        "                            <select name=\"projectPlacedtos[1].city\" id=\"placecity1\" class=\"ml8 fl\"  onchange=\"_crt_page.events.cityChange(this)\" lay-filter=\"projectPlacedtos[1].city\" lay-verify=\"required\"\n" +
                        "                                    style=\"width: 90px !important;margin-left: 10px\" lay-ignore>\n" +
                        "                                <option value=\"\">请选择</option>\n" +
                        "                            </select>\n" +
                        "                            <select name=\"projectPlacedtos[1].county\" id=\"placecounty1\" class=\"ml8 fl\" lay-filter=\"projectPlacedtos[1].county\" lay-verify=\"required\"\n" +
                        "                                    style=\"width:90px !important;margin-left: 10px\" lay-ignore>\n" +
                        "                                <option value=\"\">请选择</option>\n" +
                        "                            </select>\n" +
                        "                            <img src=\"${re.contextPath}/plugin/common/images/77@2x.png\" class=\"fl ml20 addplaceimage\" onclick=\"_crt_page.events.addPlace(this)\" >\n" +
                        "                            <img src=\"${re.contextPath}/plugin/common/images/76@2x.png\" class=\"fl ml20\" onclick=\"_crt_page.events.deletePlace(this)\">\n" +
                        "                        </div>");
                    _crt_page.events.resetPlace();

                },
                addPersonPlace: function (object) {
                    $(object).parent().after("\n" +
                        "                        <div class=\"clearfix mt10 divpersonplaceselect\">\n" +
                        "                            <select name=\"personPlacedtos[0].province\" class=\"ml8 fl\"   onchange=\"_crt_page.events.provinceChange(this)\" id=\"personplaceprovince0\" style=\"width:200px !important;\"\n" +
                        "                                    lay-verify=\"required\" lay-ignore>\n" +
                        "                                <option value=\"\">请选择</option>\n" +
                        "                                <#list provincelist as vo>\n" +
                        "                                    <option value=\"${vo.code}\">${vo.name}</option>\n" +
                        "                                </#list>\n" +
                        "                            </select>\n" +
                        "                            <select name=\"personPlacedtos[0].city\" id=\"personplacecity0\" class=\"ml8 fl\" lay-filter=\"city\" lay-verify=\"required\"\n" +
                        "                                    style=\"width: 200px !important;margin-left: 10px\" lay-ignore>\n" +
                        "                                <option value=\"\">请选择</option>\n" +
                        "                            </select>\n" +
                        "                            <img src=\"${re.contextPath}/plugin/common/images/77@2x.png\" class=\"fl ml20\" onclick=\"_crt_page.events.addPersonPlace(this)\">\n" +
                        "                            <img src=\"${re.contextPath}/plugin/common/images/76@2x.png\" class=\"fl ml20\" onclick=\"_crt_page.events.deletePersonPlace(this)\">\n" +
                        "                        ");
                    _crt_page.events.resetPersonPlace();
                },
                deletePersonPlace: function (object) {
                    var placeLength = $(".mainpersonplace").find(".divpersonplaceselect").length;
                    if (placeLength == 1) {
                        $(".mainpersonplace").find(".divpersonplaceselect").find("select").val("");
                   /*     layer.msg("地点不能全部删除", {icon: 2});*/
                    } else {
                        $(object).parent().remove();
                        _crt_page.events.resetPersonPlace();
                    }

                }

            }
        };
        _crt_page.init();
    });

    function resetRequired() {

        if("${project.status}" == "001"){
            form.verify({
                required: function(v){
                }
            })
        }
    }

    function resetRequiredSubmit() {
        form.verify({
            required: function (v) {
                if (v == "") {
                    return "必填项不能为空";
                }
            }
        })
    }
    function tzym(){
        var supProjectId = $("#supProjectId").val();
        var projectName = $("#projectName").val();
        window.parent._delTab("xm_v"+supProjectId);
        window.parent._showtab('xm_v' + supProjectId, '查看-' +projectName, '/supplier/projectManager/projectDetail?type=v&supProjectId=' +supProjectId);
        window.parent._delTabT('xm_e'+supProjectId);
    }

</script>
</body>

</html>
